<template>
  <a-card :bordered="false">
    <!-- table区域-begin -->
    <a-col :span="24 / 2">
      <a-table
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">
      </a-table>
      </a-col>
    <a-col :span="24 / 2">
      <area-chart/>
      </a-col>
  </a-card>
</template>

<script>
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import AreaChart from '@comp/chart/AreaChart'
  export default {
    name: 'PositionList',
    mixins: [JeecgListMixin],
    components: {
      AreaChart,
    },
    data() {
      return {
        description: '职务表管理页面',
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: 'center',
            customRender: function (t, r, index) {
              return parseInt(index) + 1
            }
          },
          {
            title: '客户名称',
            align: 'center',
            dataIndex: 'code'
          },
          {
            title: '店铺数量',
            align: 'center',
            dataIndex: 'name'
          },
          {
            title: '设备数量',
            align: 'center',
            dataIndex: 'postRank_dictText'
          },
          {
            title: '设备类型',
            align: 'center',
            dataIndex: 'companyId'
          }, {
            title: '试戴次数',
            align: 'center',
            dataIndex: ''
          }, {
            title: '用户量',
            align: 'center',
            dataIndex: ''
          },


        ],
        url: {
          list: '/sys/position/list',
          delete: '/sys/position/delete',
          deleteBatch: '/sys/position/deleteBatch',
          exportXlsUrl: '/sys/position/exportXls',
          importExcelUrl: 'sys/position/importExcel',
        },
      }
    },
    computed: {
      importExcelUrl: function () {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`
      }
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>